<?php
/**
 * com_easiv3
 * 
 * @author Lukas Gruber
 * @copyright 2012, Lukas Gruber
 * @license GNU/GPLv3 - http://www.gnu.org/licenses/gpl-3.0.html
 * @contact lukasgruber@gmx.net
 * @website http://www.lukasg255.bplaced.net
 */

defined('_JEXEC') or die();

jimport('joomla.application.component.view');

class Easiv3ViewManageInstances extends JView {
	
	function __construct() {
		parent::__construct();
	}
	
	function display($tpl = null) {
		$this->addToolbar();
		
		/**
		 * get data from model and assign to view
		 */
		$this->data = $this->get('InstanceInfo');
		
		parent::display($tpl);
	}
	
	function addToolbar() {
		JToolbarHelper::title(JText::_('com_EASIV3_MANAGEINSTANCES_VIEW_TITLE'), 'checkin.png');
		JToolbarHelper::addNew('manageInstances.gotoAddExistingInstance', JText::_('com_EASIV3_MANAGEINSTANCES_VIEW_BUTTON_ADD_INSTANCE'));
		JToolbarHelper::editListX('manageInstances.gotoEditInstances', JText::_('com_EASIV3_MANAGEINSTANCES_VIEW_BUTTON_EDIT'));
		JToolBarHelper::custom('manageInstances.deleteInstances', 'cancel', 'cancel', JText::_('com_EASIV3_MANAGEINSTANCES_VIEW_BUTTON_DELETE'), true);
		JToolbarHelper::divider();
		JToolBarHelper::custom('manageInstances.gotoExtensions', 'back', 'back', JText::_('com_EASIV3_MANAGEINSTANCES_VIEW_BUTTON_GOTO_EXTENSIONMANAGEMENT'), false);
	}
}